<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <link rel="stylesheet" href="${staticServer}/inc/style/main.css"/>
    <link rel="stylesheet" href="${staticServer}/inc/style/page.css"/>
    <link rel="stylesheet" href="${staticServer}/css/work_today.css"/>
    <link rel="stylesheet" href="${staticServer}/css/consultant_client_tracking.css"/>
    <script src="${staticServer}/inc/js/jquery.js"></script>
    <script src="${staticServer}/inc/js/pageset.js"></script>
    <script src="${staticServer}/inc/js/submitter.js"></script>
    <script src="${staticServer}/inc/js/infopad.js?2.2"></script>
    <script src="${staticServer}/inc/js/tips.js"></script>
    <script src="${staticServer}/js/web/consultant_client_tracking_list.js?1.0"></script>

    <link rel="stylesheet" href="${staticServer}/inc/style/date/datepicker.css"/>
    <script src="${staticServer}/inc/js/datepicker.js"></script>

    <script>
        var contextPath = '${contextPath}';
        var _contextPath = '${staticServer}';
       
        var path='http://120.55.241.58/';
        $(function () {
            $("#center").val("<#if zhichu??>${zhichu.regionns}</#if>")
        });

        var delMoney = function () {
            var $obj = $("#datas td input[type=checkbox]:checked");
            if ($obj.length == 0) {
                infopad.err("请至少选择一条记录");
                return;
            }
            if (confirm("确定删除？删除后无法恢复。")) {
                var ids = '';
                for (var i = 0; i < $obj.length; i++) {
                    if (i == $obj.length - 1) {
                        ids += $($obj[i]).val();
                    } else {
                        ids += $($obj[i]).val() + ",";
                    }
                }
                var url = contextPath + "/index/deleteTuifei.json";
                $.post(url, {"ids": ids},
                    function (ms) {
                        if (ms.msg != null) {
                            if (ms.msg == "1") {
                                infopad.msg("删除成功!");
                                setTimeout(function () {
                               		window.location.href="${contextPath}/index/tuifeiindex.htm";
                                }, 1200);
                            } else if (ms.msg == "2") {
                                infopad.err("不是自己填写的，不可删除!");
                            } else if (ms.msg == "3") {
                                infopad.err("已审核通过，不可删除!");
                            } else {
                                infopad.err("抱歉，系统忙");
                            }
                        } else {
                            infopad.err("抱歉，系统忙");
                        }
                });
            };
        }

		/**
		* 查询
		*/
        function submit() {
            window.location.href = "${contextPath}/index/tuifeiindex.htm?nickname=" + $("#stu_name").val();
        }
       
      <#-- var tsdelMoney = function (id) {
                var url = contextPath + "/index/tsdeleteMoney.json";
                $.post(url, {"id": id},
                        function (ms) {
                            if (ms.msg != null) {
                                if (ms.msg == "1") {
                                    infopad.msg("删除成功!");
                                    setTimeout(function () {
                                        location.reload();
                                    }, 1200);
                                } else if (ms.msg == "2") {
                                    infopad.err("不是自己填写的，不可删除!");
                                } else {
                                    infopad.err("抱歉，系统忙");
                                }

                            } else {
                                infopad.err("抱歉，系统忙");
                            }
                        });
            };-->
        
    </script>

    <script>

        function isSuccessOrder(flag) {
            var $obj = $("#datas td input[type=checkbox]:checked");
            if ($obj.length == 0) {
                infopad.err("请至少选择一条记录");
                return false;
            }
            var ids = '';
            for (var i = 0; i < $obj.length; i++) {
                if (i == $obj.length - 1) {
                    ids += $($obj[i]).val();
                } else {
                    ids += $($obj[i]).val() + ",";
                }
            }
            $.ajax({
                type: 'POST',
                url: 'isSuccessOrder.htm',
                data: {"ids": ids, "flag": flag},
                dataType: "text",
                success: function (data) {
                    if (data=="success"){
                        infopad.err("标记成功!");
                        window.location.reload();
                    }else {
                        infopad.err("标记失败，服务器错误！");
                    }
                },
                error: function () {
                    infopad.err("系统出现问题");
                }
            });
        }

    </script>

</head>

<body>
<input type="hidden" id="traId" value="">
<div id="home_link">
    <ul>
        <li></li>
        <li>&gt;</li>
        <li>咨询师业务管理</li>
        <li>&gt;</li>
        <li class="current">学员退费查询</li>
    </ul>
</div>
<div id="container">
    <div id="title">学员退费列表</div>
    <table class="simple_table" rel="nohover" style="min-width: 750px;">
        <tr>
            <td>
                <label for="phone">学生姓名：</label>
                <input type="text" value="${stu_name}"  id="stu_name"/>
            </td>
            <td rowspan="4">
                <input type="button" value=" 查 询 " onclick="submit()"/>
                <input type="button" value=" 删 除 " onclick="delMoney()"/>
			</td>
        </tr>
    </table>
    <table>
        <tr class="fields">
            <th width="3%"></th>
            <th width="70">学员姓名</th>
            <th width="70">退款日期</th>
            <th width="100">退款类型</th>
            <th width="100">退款金额</th>
            <!--<th width="70">接待老师</th>-->
            <th width="70">备注</th>
            <!--<th width="100">学员退费情况说明表（老师版）</th>
            <th width="100">学员退费情况说明表（家长版）</th>-->
            <th width="50">状态</th>
            <th width="50">操作</th>
        </tr>

    <#if tlist??>
        <#list tlist as list>
        <tbody id="datas">
        <tr class="even_row" >
        	<td align="center"><input name="" style="width:16px;height:16px;"  type="checkbox" value="<#if list.id??>${list.id}</#if>"></td>
            <td align="center"><#if list.stu_id?? && list.stu_id!=0>${list.stu_name}<#else>${list.student}</#if></td>
            <td align="center">${list.tuifei_date}</td>
            <td align="center">${list.course_type}</td>
            <td align="center">${list.money}</td>
            <!-- <td align="center"></td>-->
            <td align="center">${list.beizhu}</td>
            <!--<td align="center"> </td>
            <td align="center"></td>-->
            <td align="center">
            	<#if list.state == 0||list.state == "未审核">未审核
            	<#elseif list.state == 1||list.state == "待提交">待提交
            	<#elseif list.state == 2||list.state == "待整理">待整理
            	<#elseif list.state == 3||list.state == "待调查">待调查
            	<#elseif list.state == 4||list.state == "待审核">待审核
            	<#elseif list.state == 5||list.state == "待打款">待打款
            	<#elseif list.state == 6||list.state == "已退款">已退款
            	</#if>
            </td>
            <td align="center">
                  <a href="${contextPath}/index/tuifeidetail.htm?id=${list.id}">查看</a>
                	<!-- <a href="${contextPath}/index/addMoenys.htm?id=${list.id}">编辑</a>-->
            </td>
        </tr>
        </#list>
    </#if>
    </table>
</div>


<div class="emptyline"></div>
</body>
</html>